<layout name='Layout/layout_page' />
	<ol class="breadcrumb">
		<li><a href="<{:U('TrainCate/index')}>">training program</a></li>
      	<li class="active">list</li>
    </ol>

    <script type="text/javascript">
	$(document).ready (function(){
		$(".preview").preview();
	});
	</script>

	<form class="form-inline" method="get" action="index.php">
  		<div class="form-group">
    		<label>keyword</label>
    		<input type="text" class="form-control input-sm" name="keyword" value="<{$keyword}>">
  		</div>
		<button type="submit" class="btn btn-default btn-sm">search</button>
		<a href="<{:U('TrainCate/index')}>" class="btn btn-default btn-sm">reset</a>
		<input type="hidden" name="m" value="Admin" />
		<input type="hidden" name="c" value="TrainCate" />
		<input type="hidden" name="a" value="index" />
	</form>

	<p></p>

	<form id="ajaxForm" method="post" action="<{:U('TrainCate/del')}>" name="form1" class="form-horizontal form-validata">
	<TABLE class="table table-striped table-bordered table-hover">
	  <THEAD>
		<tr>
		  <TH><input class="checkall" name="checkall" type="checkbox" id="checkall" onClick="CheckAll(this.form)"/> <{:L("_public_select")}></TH>
		  <TH>Name</TH>
		  <TH>图片</TH>		   
		  <TH>状态</TH>  
		  <TH>Sort</TH>		  		  
		  <TH>Date added</TH>
		  <TH>Date update</TH>
		  <TH>Action</TH>
		</tr>
	  </THEAD>
	  <TBODY>             
			<volist name="list" id="vo">
			<tr>
			  <td><input type="checkbox" name="selectedids[]" value="<{$vo.id}>" id="<{$vo.id}>"> <{$vo.id}></td>
			  <td><a href="<{:U('TrainCate/edit' , array('id'=>$vo['id']))}>"><{$vo.name}></a></td>
			  <td><img src="<{$vo.picname}>" style="height:40px" class="preview" alt="<{$vo.picname}>" ="<{$vo.name}>"></td>		
			  <td><eq name="vo.show" value="1">display<else/><font color="red">hide</font></eq></td>
			  <td><{$vo.sort}></td>	  
              <td><{$vo.createTime|date='Y-m-d H:i:s',###}></td>
              <td><{$vo.updateTime|date='Y-m-d H:i:s',###}></td>
			  <td>
			  <a href="<{:U('TrainCate/edit' , array('id'=>$vo['id']))}>" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-edit"></i> <{:L("_public_edit")}></a>
			  </td>
			</tr>
			</volist>
	  </TBODY>
	</TABLE>

	<div class="row">
		<div class="col-md-6">
			<button class="btn btn-info btn-sm" onClick="if(!confirm('Cannot be recovered after deletion!'))return false;"><i class="glyphicon glyphicon-trash"></i> Delete selected message</button>
		</div>
		
		<div class="col-md-6">
			<div class="page">
				<nav>
  					<ul class="pagination"><{$page}></ul>
  				</nav>
  			</div>
		</div>
	</div>
	</form>

<input type="hidden" id="menu_action" value="train" />